<html>

<head>
	
	<script language="javascript">

	function reloadCalendar()
	{
		var date2='${req:date.lbound}';
		var date3='${req:date.ubound}';
		var time='${req:date.time}';
		var y = document.getElementById("year").value;
		var m = document.getElementById("month").value;
		//var date = "1" + "-" + m + "-" + y;
		var date = y + "-" + m + "-" + "1";   //"yyyy-M-d"
		url = "${def:context}/action/calendar?id=${req:parent.ElementID}&date=" + date + "&dfo=yyyy-MM-dd";
		url = url + "&date.lbound=" + date2;
		url = url + "&date.ubound=" + date3;
		url = url + "&date.time=" + time;
		window.location = url;
	}
	
	var currStyle="";

	function rowOn(obj) {
		currStyle = obj.className;
		
		if (currStyle=="calDisabled"){
		}
		else{
			if (currStyle=="calEmptyCell"){
			}
			else{
				obj.className="calDay2";
			}
		}
	}
	
	function rowOff(obj) {
		obj.className=currStyle
	}
	
	</script>
	
	<link rel="stylesheet" type="text/css" href="${def:context}/default.css" />
	
	<style>

		TABLE.calendar
		{
			background-color:#C5C5E3; 
		}
	
		TH.calendar 
		{
			color:black;
			background-color:#FFFF99;
			font-family:Arial;
			font-size:8pt;
			padding:1px;
		}
		
		TD.calEmptyCell
		{
			color:black;
			background-color:white;
			font-family: Arial;
			font-size: 8pt;
			padding:1px;
		}

		TD.calCurDay
		{
			color:blue;
			font-weight:bold;
			background-color:#CCFFFF;
			font-family: Arial;
			font-size: 8pt;
			padding:1px;
			cursor:pointer;
		}

		TD.calDay
		{
			color:black;
			background-color:white;
			font-family: Arial;
			font-size: 8pt;
			padding:1px;
			cursor:pointer;
		}

		TD.calDisabled
		{
			color:red;
			background-color:white;
			font-family: Arial;
			font-size: 8pt;
			padding:1px;
			text-decoration:line-through;
		}
		
		TD.calDay2
		{
			background-color:#CCCCCC;
			font-size: 8pt;
			font-family: Arial;
			font-weight:bold;
			cursor: pointer;
		}
		
		.calendarHeader
		{
			background-color:#E3E4FA; 
			color:black;
			font-family: Arial;
			font-size: 9pt;
			padding:1px;
		}	

	</style>
	
</head>

<body>

<center>

	<!--start calendar header-->
	<table class="calendarHeader" style="width:240px;" cellspacing="0">
	<tr>
		<td width="95%">
		<select name="month" id="month" onchange="reloadCalendar()">
			<option value="1">一月</option>
			<option value="2">二月</option>
			<option value="3">三月</option>
			<option value="4">四月</option>
			<option value="5">五月</option>
			<option value="6">六月</option>
			<option value="7">七月</option>
			<option value="8">八月</option>
			<option value="9">九月</option>
			<option value="10">十月</option>
			<option value="11">十一月</option>
			<option value="12">十二月</option>
		</select>
		&nbsp;
		<select name="year" id="year" onchange="reloadCalendar()">
			<years>
			<option value="${fld:year}">${fld:year}</option>
			</years>
		</select>
		</td>
		<td align="right" style="padding-right:4px">
			<img style="cursor:pointer" src="${def:context}/images/close.gif" title="关闭"
				onclick="parent.closeBox('${req:parent.ElementID}')">
		</td>
	</tr>
	</table>
	<!--end calendar header-->
	<!--calendar table-->
	<table  style="width:240px;height:130px" cellspacing="1">
	<tr>
		<th class="calendar">日</th>
		<th class="calendar">一</th>
		<th class="calendar">二</th>
		<th class="calendar">三</th>
		<th class="calendar">四</th>
		<th class="calendar">五</th>
		<th class="calendar">六</th>
	</tr>
	
	<!--calendar body-->
	${inc:/action/calendar/hgrid}
	
	</table>

</center>

</body>
</html>
